﻿using System;
using System.ServiceProcess;

namespace org.furia.proxy
{
    static class Program
    {
        static void Main(string[] args)
        {
            switch (args.Length)
            {
                case 0:
                    ServiceBase[] ServicesToRun;
                    ServicesToRun = new ServiceBase[] 
                    { 
                        new Service() 
                    };
                    ServiceBase.Run(ServicesToRun);
                    break;
                default:
                    Service service = new Service();
                    service.DoStart(args);
                    Console.ReadLine();
                    service.DoStop();
                    Console.ReadLine();
                    break;
            }
        }
    }
}
